tests/installed: Move auto-build logic to playbook-run.sh
authorColin Walters <walters@verbum.org>
Wed, 11 Apr 2018 17:27:15 +0000 (13:27 -0400)
committerAtomic Bot <atomic-devel@projectatomic.io>
Wed, 11 Apr 2018 19:11:07 +0000 (19:11 +0000)
This makes it a bit more convenient to make a code change, then
`rm -rf build && ./playbook-run.sh ...`.

Closes: #1535
Approved by: jlebon

tests/installed/playbook-run.sh
tests/installed/run.sh

index c18872974efd2383c01a2684c4ed9b74259b7eb9..3136899fa5d4385b77595f975fa6b1b07aa8c287 100755 (executable)
@@ -3,6 +3,12 @@
 # TEST_SUBJECTS being set.
 set -xeuo pipefail
 
+dn=$(cd $(dirname $0) && pwd)
+if ! test -d build; then
+    mkdir -p build
+    (cd build && ${dn}/../../ci/build-rpm.sh)
+fi
+
 # https://fedoraproject.org/wiki/CI/Tests
 if test -z "${TEST_SUBJECTS:-}"; then
     cat <<EOF
index 497777a7bb8ed585fb24248864e4d3c2dd432021..264a74361d5982bed0e1672a495b4284f08b85fe 100755 (executable)
@@ -5,11 +5,6 @@ set -xeuo pipefail
 
 dn=$(cd $(dirname $0) && pwd)
 
-if ! test -d build; then
-    mkdir -p build
-    (cd build && ${dn}/../../ci/build-rpm.sh)
-fi
-
 # TODO: parallelize this
 PLAYBOOKS=${PLAYBOOKS:-nondestructive.yml destructive.yml}
 for playbook in $PLAYBOOKS; do